<!-- 视频回放 -->
<script lang="ts">
export default {
  name: "playback",
};
</script>
<template>
  <div class="page-box h100 display-flex czbj">
    <div>
      <dxtable :dataJson="dataJson" :formJson="formJson" :portUrl="portUrl" :qx="qx" ref="databale" >
      </dxtable>
    </div>
  </div>
</template>
<script lang='ts' setup>
import dxtable from "../../components/util/dxtable.vue";
import { NImage } from "naive-ui";
import videoViewing from "../../components/util/videoViewing.vue";
import sort from "../../components/util/sort.vue";
import { dxget, dxpost, qurl, hf } from "../../util/index";

import { h, ref, reactive } from "vue";
const databale = ref()
const initeer = () => {
  databale.value.initDataExpose();
};
let dataJson = reactive([
  {
    title: "标题",
    key: "title",
    search: true, // 是否在搜索栏展示
    ellipsis: {
      tooltip: true
    }
  },
  {
    title: "封面",
    key: "cover",
    width:120,
    render(row) {
      return h(NImage,{src:row.cover,"class":"jfimg imgjz cz"})
    }
  },{
    title: "视频",
    key: "videoUrl",
    width:120,
    render(row) {
      return h(videoViewing,{srcbj:row.videoUrl})
    }
  },
  
  {
    title: "观看人数",
    key: "viewsNumber",
    width:100
  },

  
  {
    title: "排序",
    width: 100,
    render(row) {
      row.databaseName = "jfNewsList";
      return h(sort, {
        row,
        onCallBack: () => {
          initeer();
        },
      });
    },
  },
  {
    title: "修改时间",
    key: "addTime",
    width: "200",
    type: "daterange",
  },
]);
let portUrl = "studyAbroad/jflearnShare?type=2";
const qx = {
  DeletePermissionID: "jfplaybackdel", //删除
  EditPermissionIdentifier: "jfplaybackbj", // 编辑
  NewPermissionIdentifier: "jfplaybackxz", // 新建
  ViewPermissionID: "jfplaybackck", // 查看
};


let formJson = reactive([
  {
    title: "标题",
    key: "title",
    type:"input"
  },
  {
    title: "封面",
    key: "cover",
    type:"img",
    val:''
  },
  {
    title: "type",
    key: "type",
    val:2
  },
  {
    title: "视频地址",
    key: "videoUrl",
    type:"video",
    videoCover:"cover",
    callBack(data){
      console.log(data);
      formJson.cover = data.imgurl
    }
  },
])

</script>
  
  
  